import Vue from 'vue'
import Router from 'vue-router'
import enter from '@/components/enter/enter'
import typeList from '@/components/type-list/type-list'
import tradeList from '@/components/trade-list/trade-list'
import passList from '@/components/pass-list/pass-list'
import upload from '@/components/upload/upload'
import trade from '@/components/upload/trade'
import setDanger from '@/components/upload/setDanger'
import startUpload from '@/components/upload/startUpload'
import news from '@/components/news/news'
import register from '@/components/upload/register'
Vue.use(Router)

export default new Router({
  routes: [
    {
      //首页
      path: '/',
      name: 'enter',
      component: enter
    },{
      //找茬页面
      path: '/trade-list/:type/:index',
      name: 'trade-list',
      component: tradeList
    },
    {
      //消息
      path: '/news',
      name: 'news',
      component: news
    },
    {
      //选择行业
      path: '/type-list',
      name: 'type-list',
      component: typeList
    },
    {
      //选择行业
      path: '/startUpload',
      name: 'startUpload',
      component: startUpload
    },
    /*选择关卡*/
    {
      path: '/pass-list/:item',
      name: 'pass-list',
      component:passList
    },
    /*上传图片*/
    {
      path: '/upload',
      name: 'upload',
      component:upload
    },
    /*选择行业*/
    {
      path: '/trade',
      name: 'trade',
      component:trade
    },
    /*设置隐患点*/
    {
      path: '/setDanger',
      name: 'setDanger',
      component:setDanger
    },
    {
        path: '/register',
        name: 'register',
        component: register
    }
  ]
})
